package com.todo.member.infrastructure.repository;

import com.todo.common.common.entity.response.page.PageResult;
import com.todo.member.infrastructure.entity.condition.MemberPrivilegeInfoCondition;
import com.todo.member.infrastructure.entity.po.MemberPrivilegeInfoPO;

import java.util.List;

/**
 * @author azhebuxing
 * @date 2025/2/11 11:31
 * @description
 */
public interface MemberPrivilegeInfoRepository {
    /**
     * 插入会员权限信息
     *
     * @param memberPrivilegeInfoPO
     * @return
     */
    Boolean insertMemberPrivilegeInfoPO(MemberPrivilegeInfoPO memberPrivilegeInfoPO);

    /**
     * 更新会员权限信息
     *
     * @param memberPrivilegeInfoPO
     * @return
     */
    Boolean updateMemberPrivilegeInfoPOById(MemberPrivilegeInfoPO memberPrivilegeInfoPO);

    /**
     * 根据主键删除会员权限信息
     *
     * @param id
     * @return
     */
    Boolean removeMemberPrivilegeInfoPOById(Long id);

    /**
     * 根据主键查询会员权限信息
     *
     * @param id
     * @return
     */
    MemberPrivilegeInfoPO queryMemberPrivilegeInfoPOById(Long id);

    /**
     * 根据权限编码查询会员权限信息
     *
     * @param privilegeCode
     * @return
     */
    MemberPrivilegeInfoPO queryMemberPrivilegeInfoPOByPrivilegeCode(String privilegeCode);

    /**
     * 根据权限编码查询会员权限信息
     * @param privilegeCodeList
     * @return
     */
    List<MemberPrivilegeInfoPO> queryMemberPrivilegeInfoPOByCodeList(List<String> privilegeCodeList);

    /**
     * 根据权限名称查询会员权限信息
     *
     * @param privilegeName
     * @return
     */
    MemberPrivilegeInfoPO queryMemberPrivilegeInfoPOByPrivilegeName(String privilegeName);

    /**
     * 多条件分页查询会员权限信息
     *
     * @param memberPrivilegeInfoCondition
     * @return
     */
    PageResult<MemberPrivilegeInfoPO> queryMemberPrivilegeInfoPOByPage(MemberPrivilegeInfoCondition memberPrivilegeInfoCondition);
}
